Dynomotion

Group: DynoMotion Message: 14129 From: mmurray70@hotmail.com Date: 11/20/2016
Subject: GUI Button waiting on C Program
Hi,

Im getting a message "GUI Button waiting on C Program taking a long time to complete" from the latest version of kmotioncnc. Is there a way to adjust the time limit for this? or disable it?

I have a program that i run prior to shut down, it moves home and changes to a specific tool that i leave empty. And this takes longer then the time limit. Thanks.

Mark
 
Group: DynoMotion Message: 14132 From: Tom Kerekes Date: 11/20/2016
Subject: Re: GUI Button waiting on C Program

Hi Mark,

The time limit for a Button or Special Action is fixed at 10 seconds.

Would it be acceptable to configure the action to Execute Only (without waiting for completion)?

Regards

TK


On 11/20/2016 8:55 AM, mmurray70@... [DynoMotion] wrote:
 

Hi,


Im getting a message "GUI Button waiting on C Program taking a long time to complete" from the latest version of kmotioncnc. Is there a way to adjust the time limit for this? or disable it?

I have a program that i run prior to shut down, it moves home and changes to a specific tool that i leave empty. And this takes longer then the time limit. Thanks.

Mark
 

Group: DynoMotion Message: 14135 From: mmurray70@hotmail.com Date: 11/20/2016
Subject: Re: GUI Button waiting on C Program
Hi Tom,

Im sure that would work to prevent message from popping up, but I think this leaves the machine ready to accept other commands while doing a toolchange. I wouldnt want it possible to turn spindle on or jog machine while its doing a toolchange. 

A month or so ago when testing my orientate program i accidentally turned spindle on while it was still orientating. Thats how i learned about Execute/wait lol. No damage though thankfully. 

Mark
Group: DynoMotion Message: 14136 From: Tom Kerekes Date: 11/20/2016
Subject: Re: GUI Button waiting on C Program

Hi Mark,

Could you explain in more detail what you are doing and need to get accomplished?  Is this a User Button?

I don't think it is good design to lock the Application GUI for long periods of time so I'd like to look at other solutions.

Regards

TK



On 11/20/2016 2:49 PM, mmurray70@... [DynoMotion] wrote:
 

Hi Tom,


Im sure that would work to prevent message from popping up, but I think this leaves the machine ready to accept other commands while doing a toolchange. I wouldnt want it possible to turn spindle on or jog machine while its doing a toolchange. 

A month or so ago when testing my orientate program i accidentally turned spindle on while it was still orientating. Thats how i learned about Execute/wait lol. No damage though thankfully. 

Mark

Group: DynoMotion Message: 14140 From: mmurray70@hotmail.com Date: 11/20/2016
Subject: Re: GUI Button waiting on C Program
Hi Tom,

Its not really a big deal but i made a user button that runs a C program to prepare machine for shutdown. The program moves each axis to a certain location and it changes to a specific tool that i leave empty. My tool changer is slow, and if it has to move several tools it exceeds the time limit. 

I dont really want to simply execute without wait because obviously dont want to accidently start spindle or something while doing toolchange. 

It might be nice if the user could disable or adjust this feature. Come to think of it im pretty sure our fanuc mill at work takes much longer then 10 seconds to home, so there are probably certain situations where you may want to exec/wait for more then 10 seconds. Thanks.

Mark




Group: DynoMotion Message: 14142 From: Tom Kerekes Date: 11/20/2016
Subject: Re: GUI Button waiting on C Program

Hi Mark,

I think we should have something like a "MachineBusy" option that could be set and later reset that would disable other operations.

But sometimes operations should allow parallel activity.  Seems messy.

I think there might be a workaround for you.  If you assign a GCode File to the button the GCode can then invoke MCode operation and there is no time limit for the Gcode to execute.   I tried assigning C:\Temp\TestGcode.ngc to a button with "Execute Prog" which consists of:

M6
M0

Then M6 is configured as:

ToolChangeJunk.c Exec/Wait/Sync Thread4 Var 9

which is:

#include "KMotionDef.h"
main()
{
    int slot = persist.UserData[9];  // value stored is an int
    int id = persist.UserData[9+1];  // value stored is an int
    printf("Tool Set to slot %d id %d\n",slot,id);  // print the slot and id
    Delay_sec(20);
    printf("Tool Set to slot %d id %d Done\n",slot,id);  // print the slot and id
}

The GUI freezes for the full 20 seconds

Regards

TK


On 11/20/2016 6:20 PM, mmurray70@... [DynoMotion] wrote:
 

Hi Tom,


Its not really a big deal but i made a user button that runs a C program to prepare machine for shutdown. The program moves each axis to a certain location and it changes to a specific tool that i leave empty. My tool changer is slow, and if it has to move several tools it exceeds the time limit. 

I dont really want to simply execute without wait because obviously dont want to accidently start spindle or something while doing toolchange. 

It might be nice if the user could disable or adjust this feature. Come to think of it im pretty sure our fanuc mill at work takes much longer then 10 seconds to home, so there are probably certain situations where you may want to exec/wait for more then 10 seconds. Thanks.

Mark





Group: DynoMotion Message: 14149 From: mmurray70@hotmail.com Date: 11/21/2016
Subject: Re: GUI Button waiting on C Program
Hi Tom,

Yes this should work great for what i want to do. I had no idea i could Execute g-code programs as well as c-code programs from a user button. Thats good to know. Thanks.

Yeah a machinebusy code might come in handy. If theres a situation where it wouldn't work you could just leave it out of course. 

Mark



Group: DynoMotion Message: 14151 From: mmurray70@hotmail.com Date: 11/21/2016
Subject: Re: GUI Button waiting on C Program
Tom can you give me more details on how to execute a .ngc file from user button? Sounds simple but I get an error. It still asks me for a thread number but im thinking it shouldnt need one, what should i use here?
Group: DynoMotion Message: 14157 From: Tom Kerekes Date: 11/22/2016
Subject: Re: GUI Button waiting on C Program

The Thread and Var values are not used and can just be set to 1 and 0 respectively.  If the file extension is .ngc instead of .c it executes it as GCode.  There are a number of limitations.  Because the Interpreter and also GUI are used anything in any manner requiring those in a nested/re-entrant manner wont work (most likely deadlock).  But it does work well for some simple cases.

What error do you get?

Regards

TK


On 11/21/2016 8:08 PM, mmurray70@... [DynoMotion] wrote:
 

Tom can you give me more details on how to execute a .ngc file from user button? Sounds simple but I get an error. It still asks me for a thread number but im thinking it shouldnt need one, what should i use here?


Group: DynoMotion Message: 14161 From: mmurray70@hotmail.com Date: 11/22/2016
Subject: Re: GUI Button waiting on C Program
It said it could not open file. Double checked file and selected it again and same problem. Then i noticed for some reason it didnt load the full path to the file for the user button. My path should be C:\KMotion434e\C Programs\My Fadal\Execute M114.ngc and after selecting the file it only got My Fadal\Execute M114.ngc in the box. When i put in full path the button worked fine. 

Not sure why it did this? I have selected files since loading 4.34 and it worked ok, thought it might have something to do with it being a g code file, and tried selecting a C program and it did the same thing. Strange. 

Anyway the main problem i had is working fine now. Thanks again. 

Mark